#pragma once
#ifndef __VSCENENODE_H__
#define __VSCENENODE_H__
#include "VSceneEntity.h"

class VCoreApi VSceneNode : public VSceneEntity
{
public:
	VSceneNode(void);
	virtual ~VSceneNode(void);
	virtual VSceneNode* AsNode() { return this; }
	virtual void AttachChild(VSceneObject* Entity);
	virtual void DettachChild(VSceneObject* Entity);
	inline BOOL HasChild(VSceneObject* Child) const;
	inline UINT NumChilds() const { return m_Childs.Size();}
	inline VSceneObject* GetChild(UINT Index) const { return m_Childs[Index];}
protected:
	virtual void OnTransformDirty();
protected:
	VPODArray<VSceneObject*> m_Childs;
};

inline BOOL VSceneNode::HasChild(VSceneObject* Child) const
{
	return m_Childs.Find(Child) != 0xFFFFFFFF;
}


#endif 

